package com.xingchen.springboot3.pojo.dto;


import com.xingchen.springboot3.common.bean.Base;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.groups.Default;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 *
 * @author weijingchen
 * @DateTime 2025-09-26
 */
@EqualsAndHashCode(callSuper = false)
@Data
public class CategoryDto extends Base {
    @NotNull(groups = {update.class})
    private Integer id;
    @NotBlank
    private String categoryName;
    @NotBlank
    private String categoryAlias;


    // 如果说某个校验项没有指定分组，默认属于default 分组
    // 分组之间可以继承，A 继承 B，那么A中拥有B中所有的校验项

    public interface add extends Default {
    }

    public interface update extends Default {
    }
}
